#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from utils.HttpUtil import HttpUtil

class EasyTv():

    def __init__(self):
        self.httpUtil = HttpUtil("http://192.168.0.105")

    def setTenant(self, sn, tenantName):
        params = {}
        data = {"sn": sn, "tenantName": tenantName}
        print self.httpUtil.postJson("/app/setTenant.do", params, data).content

if __name__ == "__main__":
    easyTv = EasyTv()
    easyTv.setTenant("1234942570018", "张三")
    easyTv.setTenant("4628FH2790031", "李四")
    easyTv.setTenant("G1HD91M011602", "王五")
